﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Mobile.master" AutoEventWireup="true"
    CodeFile="results.aspx.cs" Async="true" Inherits="car_insurance_results" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <!-- Facebook Conversion Code for GG Customers -->
    <script type="text/javascript">
        (function() {
            var _fbq = window._fbq || (window._fbq = []);
            if (!_fbq.loaded) {
                var fbds = document.createElement('script');
                fbds.async = true;
                fbds.src = '//connect.facebook.net/en_US/fbds.js';
                var s = document.getElementsByTagName('script')[0];
                s.parentNode.insertBefore(fbds, s);
                _fbq.loaded = true;
            }
        })();
        window._fbq = window._fbq || [];
        window._fbq.push(['track', '6014983617962', { 'value': '0.00', 'currency': 'USD'}]);
    </script>
    <noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=6014983617962&amp;cd[value]=0.00&amp;cd[currency]=USD&amp;noscript=1" /></noscript>

    <!-- Facebook Conversion Code for GG Leads -->

    <script type="text/javascript">
        var fb_param = {};
        fb_param.pixel_id = '6012661234728';
        fb_param.value = '0.01';
        fb_param.currency = 'USD';
        (function() {
            var fpw = document.createElement('script');
            fpw.async = true;
            fpw.src = '//connect.facebook.net/en_US/fp.js';
            var ref = document.getElementsByTagName('script')[0];
            ref.parentNode.insertBefore(fpw, ref);
        })();
    </script>

    <noscript>
        <img height="1" width="1" alt="" style="display: none" src="https://www.facebook.com/offsite_event.php?id=6012661234728&amp;value=0.01&amp;currency=USD" /></noscript>

    <script type="text/javascript">
        $(document).ready(function() {
            $(".fancybox-login").fancybox({
                maxWidth: 800,
                maxHeight: 600,
                fitToView: false,
                width: '300px',
                height: '400px',
                autoSize: false,
                closeClick: false,
                openEffect: 'fade',
                closeEffect: 'fade',
                padding: '0',
                type: 'iframe',
                closeBtn: false,
                helpers: {
                    overlay: { closeClick: false }
                }
            });

            if (readCookie("GGMobileQuote") == null && document.getElementById('<%= hdnResults.ClientID%>').value > 0) {
                $("#fancybox-manual-a").trigger('click');
            }
        });
        function readCookie(name) {
            var nameEQ = name + "=";
            var ca = document.cookie.split(';');
            for (var i = 0; i < ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0) == ' ') c = c.substring(1, c.length);
                if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
            }
            return null;
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label ID="lblAdvertiser" runat="server"></asp:Label>
    <%--<a href="your-details.aspx" id="fancybox-manual-a" class="fancybox-login" visible="false">
    </a>--%>
    <%--<div id="wrapper">--%>
    <div class="fix-header">
        <div class="header">
            <a href="../home.aspx">
                <div class="logo-text">
                    GluayGluay
                </div>
            </a>
        </div>
        <div id="new-code">
            <div class="new-code">
                <asp:ImageButton runat="server" ID="ibtnNewQuote" AlternateText="" ImageUrl="~/images/new-code.png"
                    width="81px" height="29px" OnClick="ibtnNewQuote_Click" />
            </div>
        </div>
    </div>
    <%--</div>--%>
    <div class="container">
        <div id="divLoading" style="position: fixed; top: 0; left: 0; background-color: gray;
            filter: alpha(opacity=90); opacity: 0.8; width: 100%; height: 100%;">
            <table style="width: 100%; height: 300px">
                <tr>
                    <td align="center" valign="middle">
                        <img src="../images/loader/loader_main.gif" alt="Loading" width="66" height="66" align="absmiddle" />
                    </td>
                </tr>
            </table>
        </div>
        <div id="divContent" style="margin-top: 30px;">
            <asp:UpdatePanel ID="upnlResult" runat="server">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="dlCarResults" EventName="Load" />
                </Triggers>
                <ContentTemplate>
                    <div class="small-title-bg">
                        <div class="small-title">
                            <asp:Label ID="lblNoResultMessage" runat="server" CssClass="small-title"></asp:Label></div>
                        <div class="call-now">
                            <a href="tel:022688222">
                                <img src="../images/call-now.png" width="121" height="18" alt="" /></a></div>
                    </div>
                    <asp:DataList runat="server" ID="dlCarResults" OnItemDataBound="dlCarResults_ItemDataBound"
                        OnItemCommand="dlCarResults_ItemCommand">
                        <ItemTemplate>
                            <div class="search-box">
                                <div class="search-box-radius">
                                    <asp:Label runat="server" ID="lblProviderCompanyID" Text="0" Visible="false" />
                                    <asp:Label runat="server" ID="lblCarResultID" Text="0" Visible="false" />
                                    <asp:Label runat="server" Text="Coverage" ID="lblPlanName"></asp:Label>
                                    <asp:Label runat="server" Text="Coverage" ID="lblSpecialNBC"></asp:Label>
                                </div>
                                <div class="search-box-col-1">
                                    <asp:Image ID="imgProviderCompanyLogo" runat="server" ImageUrl="~/images/dhipaya_logo-small.jpg"
                                        Width="117" Height="38" AlternateText="KPI" />
                                </div>
                                <div class="search-box-col-2" runat="server" id="divbgimage">
                                    <asp:Label runat="server" ID="lblPremiumAmount" Visible="false" Text="-" Font-Bold="true"></asp:Label>
                                    <asp:Literal runat="server" ID="lblSpecial"></asp:Literal>
                                    <asp:Label runat="server" ID="lblPromotionPrice" Text="-" Font-Bold="true"></asp:Label>
                                </div>
                                <div class="search-box-col-6 search-box-expand-btn">
                                    <img src="../images/view-detail-icon.png" width="53" height="53" alt="" />
                                    <%--<asp:ImageButton ID="ibtnViewDetails" runat="server" ImageUrl="~/images/view-detail-icon.png"
                                            CommandName="ViewDetails" alt="View Details" Width="53" Height="53" BorderWidth="0" />--%>
                                </div>
                                <div class="search-box-col-3">
                                    <a href="#">
                                        <%--<img src="../images/email-icon.png" width="53" height="53" alt="" />--%>
                                        <asp:ImageButton ID="imgEmailQuote" runat="server" ImageUrl="~/images/email-icon.png"
                                            CommandName="Email" alt="Email Quote" Width="53" Height="53" BorderWidth="0"
                                            OnClientClick="return ConfirmEmail();" />
                                    </a>
                                </div>
                                <div class="search-box-col-4">
                                    <a href="#">
                                        <asp:ImageButton ID="ibtnCallMe" runat="server" ImageUrl="~/images/call-icon.png"
                                            CommandName="CallMe" alt="Call Me" Width="53" Height="53" BorderWidth="0" />
                                    </a>
                                </div>
                                <div class="search-box-col-5">
                                    <a href="#">
                                        <asp:ImageButton ID="imgBuyNow" runat="server" ImageUrl="~/images/cart-icon.png"
                                            CommandName="Buy" alt="Buy Now" Width="53" Height="53" BorderWidth="0" />
                                    </a>
                                </div>
                                <div class="content" style="display: none;">
                                    <table width="263" border="0" align="center" cellpadding="2" cellspacing="2" class="show-hide-box">
                                        <%-- <tr>
                                            <td width="134" height="21" valign="top" bgcolor="#e8e8e8">
                                                <asp:Label ID="lblTitleRefNo" runat="server"></asp:Label>
                                            </td>
                                            <td width="115" valign="top" bgcolor="#e8e8e8">
                                                <asp:Label ID="lblRefNo" runat="server"></asp:Label>
                                            </td>
                                        </tr>--%>
                                        <tr>
                                            <td width="134" height="21" valign="top" bgcolor="#e8e8e8">
                                                <asp:Label ID="lblTitleGarage" runat="server"></asp:Label>
                                            </td>
                                            <td width="115" valign="top" bgcolor="#e8e8e8">
                                                <asp:Label ID="lblGarage" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="21" valign="top">
                                                <asp:Label ID="lblTitleMakeModel" runat="server"></asp:Label>
                                            </td>
                                            <td valign="top">
                                                <asp:Label ID="lblMakeModel" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="21" valign="top" bgcolor="#e8e8e8">
                                                <asp:Label ID="lblTitleCarYear" runat="server"></asp:Label>
                                            </td>
                                            <td valign="top" bgcolor="#e8e8e8">
                                                <asp:Label ID="lblCarYear" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="21" valign="top">
                                                <asp:Label ID="lblTitleExcess" runat="server"></asp:Label>
                                            </td>
                                            <td valign="top">
                                                <asp:Label ID="lblExcess" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="21" valign="top" bgcolor="#e8e8e8">
                                                <asp:Label ID="lblTitleSumInsure" runat="server"></asp:Label>
                                            </td>
                                            <td valign="top" bgcolor="#e8e8e8">
                                                <asp:Label ID="lblSumInsure" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <%-- <tr>
                                            <td colspan="2">  
                                                <hr />
                                            </td>
                                        </tr>  --%>
                                    </table>
                                </div>
                                <div style="clear: both;">
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:DataList>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <div style="display: none;">
            <asp:HiddenField ID="hdnUserLoginStatus" runat="server" Value="0" />
            <asp:HiddenField ID="hdnQuoteId" runat="server" Value="0" />
            <asp:HiddenField ID="hdnCarId" runat="server" Value="0" />
            <asp:HiddenField ID="hdnPolicyId" runat="server" Value="0" />
            <asp:HiddenField ID="hdnResults" runat="server" Value="0" />
            <asp:HiddenField ID="hdnEmail" runat="server" Value="" />
            <asp:HiddenField ID="hdnInsuranceType" runat="server" Value="10"" />
        </div>
    </div>

    <script type="text/javascript">
        $(".search-box-expand-btn").click(function() {
            $header = $(this);
            $content = $header.parent().parent().find(".content");
            if ($content.is(":hidden")) {
                $(".content").slideUp(500);
                $content.slideToggle(500, function() {
                    //execute this after slideToggle is done
                });
            }
            else {
                $(".content").slideUp(500);
            }

        });
        
    </script>

    <script type="text/javascript">
        function ConfirmBuy() {
            var _retVal = false;
            _retVal = window.confirm('<%=GetGlobalResourceObject("CarMenu", "WanttoBuy")%>');

            if (_retVal) {
                window.onbeforeunload = null;
            }

            return _retVal;
        }
    </script>

    <script type="text/javascript">
        function ConfirmEmail() {
            var _retVal = false;
            var _message = '<%=GetGlobalResourceObject("CarMenu", "WanttoEmail")%>';
            _message = _message + ' ' + document.getElementById('<%= hdnEmail.ClientID%>').value;

            _retVal = window.confirm(_message);

            if (_retVal) {
                window.onbeforeunload = null;
            }

            return _retVal;
        }
    </script>

    <script type="text/javascript">
        HideLoading();
    </script>

    <!-- Google Code for Results Page Mobile (EN-TH) Conversion Page -->

    <script type="text/javascript">
        /* <![CDATA[ */
        var google_conversion_id = 1013678288;
        var google_conversion_language = "en";
        var google_conversion_format = "3";
        var google_conversion_color = "ffffff";
        var google_conversion_label = "DissCNDAtgIQ0IGu4wM";
        var google_conversion_value = 1.000000;
        var google_remarketing_only = false;
        /* ]]> */
    </script>

    <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
    </script>

    <noscript>
        <div style="display: inline;">
            <img height="1" width="1" style="border-style: none;" alt="" src="//www.googleadservices.com/pagead/conversion/1013678288/?value=1.000000&amp;label=DissCNDAtgIQ0IGu4wM&amp;guid=ON&amp;script=0" />
        </div>
    </noscript>
</asp:Content>
